package com.koron.css2.clientCenter.bean;

import java.io.Serializable;
import java.util.Date;

/**
 * valve_transfer_history
 *
 * @author
 */
public class ValveTransferHistoryBean implements Serializable {
    private String id;

    /**
     * 发起人
     */
    private String sponsor;
    private String sponsorAccount;
    /**
     * 转办单据类型
     */
    private String type;

    /**
     * 转办单据id
     */
    private String detailId;

    /**
     * 被委派人
     */
    private String mandatary;

    private String mandataryAccount;
    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 前受理人
     */
    private String beforeOperatorName;

    /**
     * 前受理人账号
     */
    private String beforeOperatorAccount;


    private static final long serialVersionUID = 1L;

    public ValveTransferHistoryBean(ValveTransferBean transferBean) {
        this.detailId = transferBean.getId();
        this.type = transferBean.getType();
        this.mandatary = transferBean.getName();
        this.mandataryAccount = transferBean.getAccount();
        this.beforeOperatorName = transferBean.getOperatorName();
        this.beforeOperatorAccount = transferBean.getOperatorAccount();
    }


    public String getSponsorAccount() {
        return sponsorAccount;
    }

    public void setSponsorAccount(String sponsorAccount) {
        this.sponsorAccount = sponsorAccount;
    }

    public String getMandataryAccount() {
        return mandataryAccount;
    }

    public void setMandataryAccount(String mandataryAccount) {
        this.mandataryAccount = mandataryAccount;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSponsor() {
        return sponsor;
    }

    public void setSponsor(String sponsor) {
        this.sponsor = sponsor;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getdetailId() {
        return detailId;
    }

    public void setdetailId(String detailId) {
        this.detailId = detailId;
    }

    public String getMandatary() {
        return mandatary;
    }

    public void setMandatary(String mandatary) {
        this.mandatary = mandatary;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ValveTransferHistoryBean other = (ValveTransferHistoryBean) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getSponsor() == null ? other.getSponsor() == null : this.getSponsor().equals(other.getSponsor()))
                && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
                && (this.getdetailId() == null ? other.getdetailId() == null : this.getdetailId().equals(other.getdetailId()))
                && (this.getMandatary() == null ? other.getMandatary() == null : this.getMandatary().equals(other.getMandatary()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSponsor() == null) ? 0 : getSponsor().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getdetailId() == null) ? 0 : getdetailId().hashCode());
        result = prime * result + ((getMandatary() == null) ? 0 : getMandatary().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", sponsor=").append(sponsor);
        sb.append(", type=").append(type);
        sb.append(", detailId=").append(detailId);
        sb.append(", mandatary=").append(mandatary);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}